from openpyxl import Workbook, load_workbook
import excel
target_path = 'C:\\Users\\刘浩东\\Desktop\\python_code\\data.xlsx'

driver = excel.ExcelDriver(target_path)

driver.choose_target("Sheet1")

# heads = ["编号","姓名","年龄","薪资","家庭住址","职位"]
# driver.create_to_head(heads)

# datas = [["1","张三","21","4000","小区1","测试开发实习生"],
#          ["2","李四","21","3500","小区2","后台开发实习生"]]
# driver.insert(datas)
condition=lambda row: row[3] < "4000" and row[2] >= "21"
res = driver.query(condition,False)
for i in res:
    print(res)
driver.save(target_path)


